package xyz.mumuwei.youthcourseserver.utils;

/**
 * @author mumuwei
 * @date 2022/4/4
 */
public class TextUtil {

    public static String vaildRalName(String name) {
        if (name.length() > 2) {
            return name.charAt(0) + "**" + name.charAt(name.length() - 1);
        } else {
            return name.charAt(0) + "*";
        }
    }

    public static String vaildPhone(String phone) {
        return phone.substring(0,3) + "****" + phone.substring(7, 11);
    }
}
